package com.bulls.demo.hrmsdemo.helper;

import com.bulls.demo.hrmsdemo.db.Vendor;
import com.bulls.demo.hrmsdemo.form.VendorMasterForm;
import com.bulls.demo.hrmsdemo.utils.Utilities;

public class VendorMasterHelper {
	
	public static void toDomainObject(VendorMasterForm form,Vendor vendor){
		vendor.setVendorsk(Utilities.isNull(form.getVendorsk())?new Long(0):Long.valueOf(form.getVendorsk()));
		vendor.setVendorid(form.getVendorid());
		vendor.setVendorname(form.getVendorname());
		vendor.setContactperson(form.getContactperson());
		vendor.setContactpersonnumber(form.getContactpersonnumber());
		vendor.setIsregistered(form.getIsregistered());
		vendor.setRegisternumber(form.getRegisternumber());
		vendor.setTinnumber(form.getTinnumber());
		vendor.setModeoftransport(form.getModeoftransport());
		vendor.setContactpersonaddress1(form.getContactpersonaddress1());
		vendor.setContactpersonaddress2(form.getContactpersonaddress2());
		vendor.setContactpersoncountry(form.getContactpersoncountry());
		vendor.setContactpersonstate(form.getContactpersonstate());
		vendor.setContactpersoncity(form.getContactpersoncity());
		vendor.setContactpersonpincode(form.getContactpersonpincode());
		vendor.setContactpersonemailid(form.getContactpersonemailid());
		vendor.setContactpersontelephone(form.getContactpersontelephone());
		vendor.setAddress1(form.getAddress1());
		vendor.setAddress2(form.getAddress2());
		vendor.setCountry(form.getCountry());
		vendor.setState(form.getState());
		vendor.setCity(form.getCity());
		vendor.setPincode(form.getPincode());
		vendor.setEmailid(form.getEmailid());
		vendor.setLandlinenumber(form.getLandlinenumber());
		vendor.setAccountnumber(form.getAccountnumber());
		vendor.setAccountholdername(form.getAccountholdername());
		vendor.setAcoounttype(form.getAcoounttype());
		vendor.setBank(form.getBank());
		vendor.setBranch(form.getBranch());
		vendor.setIfsccode(form.getIfsccode());
		vendor.setModeofpayment(form.getModeofpayment());
		vendor.setPannumber(form.getPannumber());
	}

}
